import request from '@/router/axios';

//获取系统定义的标签
export const getSystemTags = () => {
  return request({
    url: '/api/beetles-offer/tags/system/list',
    method: 'get',
  })
}
//获取租户自定义的标签
export const getTenantTags = () => {
  return request({
    url: '/api/beetles-offer/tags/tenant/list',
    method: 'get',
  })
}

//获取订单
export const getOfferIdList = (params = {}) =>{
  return request({
    url:"/api/beetles-business/offer/get-select",
    method:'get',
    params: {
      ...params
    }
  })
}

//  保存/更新模板
export const submitModel = (data) =>{
  return request({
    url:'/api/beetles-offer/tags/model/submit',
    method:'post',
    data:data
  })
}

//获取模板列表
export const getPage = (current, size, params) =>{
  return request({
    url:'/api/beetles-offer/tags/model/page',
    method:'get',
    params:{
      ...params,
      current,
      size,
    }
  })
}

//删除模板
export const removeModel = (ids) =>{
  return request({
    url:'/api/beetles-offer/tags/model/remove',
    method:'delete',
    params:{
      ids:ids
    }
  })
}
//保存系统标签
export const saveSystemTags = (data) =>{
  return request({
    url: '/api/beetles-offer/tags/system/submit',
    method: 'post',
    data: {tags: data}
  })
}
//获取系统标签
export const getSystemTagsList = () =>{
  return request({
    url: '/api/beetles-offer/tags/system/list',
    method: 'get',
  })
}
//保存租户标签
export const submitTenant = (data) =>{
  return request({
    url: '/api/beetles-offer/tags/tenant/submit',
    method: 'post',
    data: {tags: data}
  })
}
//获取租户标签
export const getTenantTagsList = () =>{
  return request({
    url: '/api/beetles-offer/tags/tenant/list',
    method: 'get'
  })
}
